﻿@{
    Layout = null;
}
<html>
<head>
    <title></title>

    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery-ui.custom.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery.cookie.js", true)" type="text/javascript"></script>

    <link href="@Url.Content("~/Scripts/dynatree/skin/ui.dynatree.css", true)" rel="stylesheet" type="text/css" />

    @*<link href="@Url.Content("~/Scripts/skin-custom/custom.css",true)" rel="stylesheet" type="text/css" />*@

    <script src="@Url.Content("~/Scripts/dynatree/jquery.dynatree.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>

    @if (false)
    {
        <script src="../../../../Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/json2.js" type="text/javascript"></script>
    }
    <style type="text/css">
        #tree ul.dynatree-container
        {
            overflow: auto;
            position: relative;
            height: 100%;
        }
        body
        {
            margin: 0px;
            font-size: 12px;
            color: #FFFFFF;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function () {
            var data = "";
            var logid = $("#hidLogid").val();
            if (logid == 'admin') {
                data = "[{\"title\":\"系统管理\",\"key\":\"Social\",\"expand\":true,\"icon\":\"6.png\",\"children\":[{\"title\":\"社会信息查询\",\"expand\":true,\"icon\":\"83.png\",\"href\":\"/Social/AjaxSearchPost\",\"target\":\"content\"},{\"title\":\"南站广场派出所车次\",\"expand\":true,\"icon\":\"89.png\",\"href\":\"/Social/gcpcsccMain\",\"target\":\"content\"},{\"title\":\"用户管理\",\"expand\":true,\"icon\":\"43.png\",\"href\":\"/User/Userlist\",\"target\":\"content\"},{\"title\":\"密码修改\",\"expand\":true,\"icon\":\"79.png\",\"href\":\"/User/EditPassword\",\"target\":\"content\"}]}]";
            }
            else {
                data = "[{\"title\":\"系统管理\",\"key\":\"Social\",\"expand\":true,\"icon\":\"6.png\",\"children\":[{\"title\":\"社会信息查询\",\"expand\":true,\"icon\":\"83.png\",\"href\":\"/Social/AjaxSearchPost\",\"target\":\"content\"},{\"title\":\"南站广场派出所车次\",\"expand\":true,\"icon\":\"89.png\",\"href\":\"/Social/gcpcsccMain\",\"target\":\"content\"},{\"title\":\"密码修改\",\"expand\":true,\"icon\":\"79.png\",\"href\":\"/User/EditPassword\",\"target\":\"content\"}]}]";
            }
            data = JSON.parse(data);
            $("#tree").dynatree({
                imagePath: "/Scripts/skin-custom/",
                children: data,
                onClick: function (node) {
                    if (node.data.href) {
                        window.open(node.data.href, node.data.target);
                    }
                }
            });
        });
       
    </script>
</head>
<body>
@Html.Hidden("hidLogid",@ViewData["LoginId"])
    <div id="tree">

    </div>
</body>
</html>
